package cn.itcast.bos.service.take_delivery;

import java.util.Date;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;

import cn.itcast.bos.domain.page.PageBean;
import cn.itcast.bos.domain.take_delivery.Promotion;

public interface PromotionService {

	void save(Promotion model);

	Page<Promotion> findAll(Specification<Promotion> specification, Pageable pageable);

	// 分页展示,新建TO类用于服务器之间的传递
	@GET
	@Path("/showPage")
	@Produces({ "application/xml", "application/json" })
	PageBean<Promotion> showPage(@QueryParam("page") Integer page, @QueryParam("rows") Integer rows);

	// 根据id单个查询
	@GET
	@Path("/findById/{id}")
	@Produces({ "application/xml", "application/json" })
	Promotion findById(@PathParam("id") Integer id);

	// 修改活动状态
	void updateStatus(Date date);

	// spring_task测试
	public String taskDemo();
}
